﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="examinfo.aspx.cs" Inherits="Manage_examinfo" %>

<!doctype html>
<html>
<head id="Head1" runat="server">
<meta http-equiv="x-ua-compatible" content="ie=7" />

<link href="../css/Exam.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery/jquery.cookie.js"></script>
<script type="text/javascript" src="../js/shielding.js"></script>
<script type="text/javascript">
    window.onresize = function () { setcontent(); };
    //设置页面布局
    function setcontent() {
        var obj = $("#content");
        var windowWidth = document.documentElement.clientWidth;
        var windowHeight = document.documentElement.clientHeight;
        $(obj).css({
            "width": windowWidth - 200,
            "height": windowHeight - 50 - 64,
            "float": "left"
        });
    }
</script>
<title><%=model.PaperName %></title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="banner"><div class="banner_right"></div></div>
    <div class="topbar"><h1><%=model.PaperName %></h1></div>
    
    <div id="content">

    <% 
        for (int i = 0; i < model.ExamQuestionTypeList.Count; i++) {
           %>
    <div class="questionTypeTitle">
        <div>
        <%= String.Format(Resources.labels.QuestionNo, (i + 1))%>
        <%=model.ExamQuestionTypeList[i].QuestionTypeTitle.Trim()%>

        <%--每题<%=model.ExamQuestionTypeList[i].Score %>分--%> 
        <%= String.Format(Resources.labels.questionScore, model.ExamQuestionTypeList[i].Score)%>

        <%--共计<%=model.ExamQuestionTypeList[i].QuestionList.Count%>道题--%>
        <%= String.Format(Resources.labels.questionNumberpoint, model.ExamQuestionTypeList[i].QuestionList.Count)%>


        </div>
    </div>
    <div  class="questionlist">
        <%
            System.Collections.Generic.List<Exam.Core.Model.ExamQuestion> objQuestions = model.ExamQuestionTypeList[i].QuestionList;
            for (int k = 0; k < objQuestions.Count; k++) { %>
            <div class="question" id="question_<%=objQuestions[k].QuestionId.Trim()%>">
                <div class="questioncontent">
                <span style="margin-top:10px;color:#005500;">
                <%= String.Format(Resources.labels.QuestionLitNo, getNumber(k + 1))%>
                </span> 
                <%=Server.HtmlDecode(objQuestions[k].QuestionContent.Trim())%></div>
                
                <div class="questionanswer">
                    <%if (model.ExamQuestionTypeList[i].QuestionTypeAttr.Trim() == "0") {%>
                    
                    <%if (objQuestions[k].QuestionType.Trim()=="1") {%><!--单选-->
                        <div class="optsContent">
                        <%System.Collections.Generic.List<Exam.Core.Model.ExamOpts> objOpts = objQuestions[k].ExamOptsList;
                        for (int m = 0; m < objOpts.Count; m++) { %>
                            <!--题型_试题ID-->
                            <input id="Rad_<%=objOpts[m].QuestionId.Trim() %>_<%=objOpts[m].QuestionOptsID %>" name="1_<%=objOpts[m].QuestionId.Trim() %>" type="radio" value="<%=objOpts[m].QuestionOptsValue.Trim()%>" onclick="return Sel('<%=objOpts[m].QuestionId.Trim() %>')" />
                            <%=objOpts[m].QuestionOptsValue.Trim()%> <%=Server.HtmlDecode(objOpts[m].QuestionOptsText.Trim())%>
                        <%} %>
                        </div>
                    <%} %>
                    <%else if (objQuestions[k].QuestionType.Trim()=="2") {%><!--多选-->
                        <div class="optsContent">
                        <%System.Collections.Generic.List<Exam.Core.Model.ExamOpts> objOpts = objQuestions[k].ExamOptsList;
                        for (int m = 0; m < objOpts.Count; m++) { %>
                            <input id="Rad_<%=objOpts[m].QuestionId.Trim() %>_<%=objOpts[m].QuestionOptsID %>" name="2_<%=objOpts[m].QuestionId.Trim() %>" type="checkbox" value="<%=objOpts[m].QuestionOptsValue.Trim()%>" onclick="return Sel('<%=objOpts[m].QuestionId.Trim() %>')" />
                            <%=objOpts[m].QuestionOptsValue.Trim()%> <%=Server.HtmlDecode(objOpts[m].QuestionOptsText.Trim())%>
                        <%} %>
                        </div>
                    <%} %>
                    <%else if (objQuestions[k].QuestionType.Trim()=="3") {%><!--判断-->
                            <input id="Rad_3_1_<%=objQuestions[k].QuestionId.Trim() %>" name="3_<%=objQuestions[k].QuestionId.Trim() %>" type="radio" value="true"  onclick="return Sel('<%=objQuestions[k].QuestionId.Trim() %>')" />
                            <%= Resources.labels.right%>
                            <input id="Rad_3_2_<%=objQuestions[k].QuestionId.Trim() %>" name="3_<%=objQuestions[k].QuestionId.Trim() %>" type="radio" value="false" onclick="return Sel('<%=objQuestions[k].QuestionId.Trim() %>')" />
                            <%= Resources.labels.error%>
                    <%} %>
                    
                        
                        
                    <%}
                      else { %>
                        <div class="answerContent"><textarea id="txt_<%=objQuestions[k].QuestionType %>_<%=objQuestions[k].QuestionId.Trim() %>" name="<%=objQuestions[k].QuestionType %>_<%=objQuestions[k].QuestionId.Trim() %>" style="width:410px;height:40px;"  onclick="return Sel('<%=objQuestions[k].QuestionId.Trim() %>')" ></textarea></div>
                    <%} %>

                    
                </div>

                <div class="stuanswer"><%=getStuAnswer(model.ExamQuestionTypeList[i].QuestionTypeId.Trim(), objQuestions[k].QuestionId.Trim())%></div>


            </div>
        <%} %>
    </div>
    
    
    <%} %>
    </div>
    
    <div id="right">
        <%= Resources.labels.info%>：<br />
        <div><%= Resources.labels.ExamTime%>：<%=model.PaperTime%><%= Resources.labels.Minute%></div>
        <div><%= Resources.labels.StarExamTime%>：</div>
        <div><%=stuexammodel.StarTime.Trim()%></div>
        <div><%= Resources.labels.SubmitExamTime%>：</div>
        <div><%=stuexammodel.EndTime.Trim()%></div>
        <div>
        <%= String.Format(Resources.labels.questionNumberpoint, qnumber)%></div>
        <div style="color:#FF0000;font-weight:bold;">
            <%= Resources.labels.real_Score%>：<span id="spantime" ><%=stuexammodel.TotalScore.Trim()%></span></div>
        
        <div><%= Resources.labels.Score_percent%> <span id="status"><%=stuexammodel.TotalScorePer.Trim()%></span> </div>
        
    </div>
    <br class="clear" />
    <div id="footer">

    </div>
    
    </form>
  
</body>
</html>